let user_model = require('../../database/model/user')
let Util = require('../../lib/util')

let loginUser = function(req,res,next){
    let userName = req.body.username
    let pwd = req.body.password
    user_model.findone({user_name:userName,password:pwd},function (err,result) {

    })
}
let createUser = function (req, res, next) {
    let data = req.body
    user_model.create(data,function(err,result){
        if(err){
            console.log(err)
            Util.formatErrorRes(err)
            return
        }
    })
};
module.exports = {
    createUser: createUser,
    loginUser: loginUser
}